package com.day0928.polymorphic;

public class Cat extends Pet{
    private String hobby;

    public Cat(String name, int health, int love, String hobby) {
        super(name, health, love);
        this.hobby = hobby;
    }

    @Override
    public void show() {
        super.show();
        System.out.println("爱好" + this.hobby);
    }

    @Override
    public void eat() {
        System.out.println("猫吃🐟,喜爱度增加");
        super.love += 10;
    }

    @Override
    public void toHospotial() {
        System.out.println("猫猫去医院，健康值增加");
        super.health += 10;
    }
    public void lumao(){
        System.out.println("撸猫猫");
    }
}
